/* 整体页面背景 */
body {
    font-family: Arial, sans-serif;
    background-color: #e6e6e6;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    justify-content: center;
    background-image: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    animation: fadeIn 1s ease both;
    position: relative;
    overflow: hidden;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    color: #fff;
    margin-bottom: 15px;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-radius: 15px;
    width: 70%;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-size: 36px;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

h1:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(to bottom right, #ff9a9e 0%, #fad0c4 100%);
    border-radius: 15px;
    z-index: -1;
    opacity: 0;
    transition: all 0.3s ease;
}

h1:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

h1:hover:before {
    opacity: 1;
}

/* 按钮通用样式 */
button {
    background-color: #007BFF;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2), 0 3px 3px rgba(0, 0, 0, 0.1);
    font-size: 16px;
    position: relative;
    z-index: 2;
    overflow: hidden;
}

button:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: #0056b3;
    transition: all 0.3s ease;
    z-index: -1;
}

button:hover {
    transform: translateY(-5px);
}

button:hover:before {
    width: 100%;
}

button:active {
    transform: translateY(0);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(0, 0, 0, 0.05);
}

/* 表单通用样式 */
form {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2), 0 4px 4px rgba(0, 0, 0, 0.1);
    width: 350px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    animation: fadeInUp 1s ease both;
    position: relative;
    z-index: 2;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

input[type="text"],
input[type="number"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    max-width: 300px;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

input[type="text"]:focus,
input[type="number"]:focus {
    border-color: #007BFF;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 77, 255, 0.3);
}

/* 用户列表样式 */
#userList {
    width: 70%;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 15px;
    margin-top: 20px;
    animation: fadeInDown 1s ease both;
    position: relative;
    z-index: 2;
}

@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

#userList ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#userList li {
    display: table-row;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

#userList li:hover {
    background-color: rgba(255, 255, 255, 0.7);
}

#userList li span {
    display: table-cell;
    padding: 8px 12px;
    border: 1px solid #ccc;
    color: #333;
    font-size: 14px;
}

/* 背景特效 */
body:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #e6e6e6; /* 设置备用背景颜色 */
    opacity: 0.2;
    z-index: 1;
    animation: rotatePattern 20s linear infinite;
}

@keyframes rotatePattern {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 遮罩层样式，用于模态框效果 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

#updateUserForm {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2), 0 4px 4px rgba(0, 0, 0, 0.1);
    width: 350px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    animation: fadeInUp 1s ease both;
    position: absolute;
    z-index: 1000;
    /* 以下为新增样式，限制最大高度并设置溢出滚动条 */
    max-height: 80vh;
    overflow-y: auto;
}

/* 退出按钮样式，修改按钮文字为“刷新” */
.exit-button {
    background-color: #ccc;
    color: #333;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 5px;
    text-align: center;
    /* 仅修改此处文字内容 */
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    content: "刷新";
}

.exit-button:hover {
    background-color: #999;
    color: #fff;
}